var myDiv = document.createElement('div');
var myBtn = document.createElement('button')
myDiv.id = 'myDiv'
myDiv.innerHTML = '久坐提醒';
myDiv.style.display = 'none'
myDiv.style.position = 'fixed';
myDiv.style.right = '40px';
myDiv.style.top = '50%';
myDiv.style.opacity = '0.9';
myDiv.style.zIndex = 1000;
myBtn.id = 'myBtn'
myBtn.innerHTML = '确认'
document.body.appendChild(myDiv);
myDiv.appendChild(myBtn)

chrome.runtime.onMessage.addListener(function (message, sender, sendResponse1) {
    if (message == '1') {
        document.getElementById('myDiv').style.display = 'block'
        sendResponse1('收到')
    }
})
$(document).ready(function (){
    $('#myBtn').click(function (){
        document.getElementById('myDiv').style.display = 'none'
    })
})
